package behavioral.mediator;

/**
 * @Description: 聊天平台
 * @Author: lxt
 * @CreateDate: 2019/11/1
 **/
public class ChatMediator extends AbstractMediator {

    public ChatMediator(Colleague sender, Colleague receiver) {
        this.setReceiver(receiver);
        this.setSender(sender);
    }

    public void sendMessage() {
        this.receiveMessage();
    }

    public void receiveMessage() {
        this.getReceiver().receiveMessage();
    }
}
